package cn.iocoder.yudao.module.call.dal.mysql.whiteaudit;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.call.dal.dataobject.whiteaudit.WhiteAuditDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.call.controller.admin.whiteaudit.vo.*;

/**
 * 报白审批 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface WhiteAuditMapper extends BaseMapperX<WhiteAuditDO> {

    default PageResult<WhiteAuditDO> selectPage(WhiteAuditPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WhiteAuditDO>()
                .eqIfPresent(WhiteAuditDO::getTenantId, reqVO.getTenantId())
                .likeIfPresent(WhiteAuditDO::getName, reqVO.getName())
                .eqIfPresent(WhiteAuditDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(WhiteAuditDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WhiteAuditDO::getId));
    }

}